﻿using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Prism.Regions;
using compshop.Modules.GeneralProductParameters.View;
using compshop.Infrastructure;

namespace compshop.Modules.GeneralProductParameters
{
    public class GeneralProductParametersModule:IModule
    {
        private readonly IUnityContainer _container;
        private IRegionManager _regionManager;

        public GeneralProductParametersModule(IUnityContainer container, IRegionManager regionManager)
        {
            _container = container;
            _regionManager = regionManager;
        }

        public void Initialize()
        {
            _regionManager.Regions[RegionNames.GeneralProductParametersContent].Add(_container.Resolve<GeneralProductParametersView>());
        }
    }
}
